package origin.database;

import origin.database.ConnectionPoolFactory;
import origin.database.DBCPConnectionPool;
import origin.database.IConnectionPool;

public class ConnectionPoolFactory {

	private static ConnectionPoolFactory instance = null;
	
	private ConnectionPoolFactory(){
	
	}
	
	public static synchronized ConnectionPoolFactory getInstance(){
		if(instance==null)
			instance = new ConnectionPoolFactory();
		return instance;
	} 
	
	private DBCPConnectionPool dbcp =null;
	public synchronized IConnectionPool getDefaultConnectionPool(){
		if(dbcp==null)
			dbcp = new DBCPConnectionPool();
		return dbcp;
	}
	
}
